package studia.figlewicz.dao.ejb;

// Generated 2011-06-03 08:31:30 by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Wycenaportfela generated by hbm2java
 */
@Entity
@Table(name = "WYCENAPORTFELA", schema = "MARCIN")
public class Wycenaportfela implements java.io.Serializable {

	private WycenaportfelaId id;
	private Portfel portfel;
	private Date datauzyskaniawyniku;
	private BigDecimal cenarealna;
	private BigDecimal delta;
	private BigDecimal gamma;
	private BigDecimal rho;
	private BigDecimal vega;
	private String login;
	private String opis;
	private Set<Wycenainstrumentu> wycenainstrumentus = new HashSet<Wycenainstrumentu>(
			0);

	public Wycenaportfela() {
	}

	public Wycenaportfela(WycenaportfelaId id, Portfel portfel) {
		this.id = id;
		this.portfel = portfel;
	}

	public Wycenaportfela(WycenaportfelaId id, Portfel portfel,
			Date datauzyskaniawyniku, BigDecimal cenarealna, BigDecimal delta,
			BigDecimal gamma, BigDecimal rho, BigDecimal vega, String login,
			String opis, Set<Wycenainstrumentu> wycenainstrumentus) {
		this.id = id;
		this.portfel = portfel;
		this.datauzyskaniawyniku = datauzyskaniawyniku;
		this.cenarealna = cenarealna;
		this.delta = delta;
		this.gamma = gamma;
		this.rho = rho;
		this.vega = vega;
		this.login = login;
		this.opis = opis;
		this.wycenainstrumentus = wycenainstrumentus;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "nazwaportfela", column = @Column(name = "NAZWAPORTFELA", nullable = false, length = 50)),
			@AttributeOverride(name = "datawyceny", column = @Column(name = "DATAWYCENY", nullable = false, length = 7)) })
	public WycenaportfelaId getId() {
		return this.id;
	}

	public void setId(WycenaportfelaId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NAZWAPORTFELA", nullable = false, insertable = false, updatable = false)
	public Portfel getPortfel() {
		return this.portfel;
	}

	public void setPortfel(Portfel portfel) {
		this.portfel = portfel;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "DATAUZYSKANIAWYNIKU", length = 7)
	public Date getDatauzyskaniawyniku() {
		return this.datauzyskaniawyniku;
	}

	public void setDatauzyskaniawyniku(Date datauzyskaniawyniku) {
		this.datauzyskaniawyniku = datauzyskaniawyniku;
	}

	@Column(name = "CENAREALNA", precision = 24, scale = 12)
	public BigDecimal getCenarealna() {
		return this.cenarealna;
	}

	public void setCenarealna(BigDecimal cenarealna) {
		this.cenarealna = cenarealna;
	}

	@Column(name = "DELTA", precision = 24, scale = 12)
	public BigDecimal getDelta() {
		return this.delta;
	}

	public void setDelta(BigDecimal delta) {
		this.delta = delta;
	}

	@Column(name = "GAMMA", precision = 24, scale = 12)
	public BigDecimal getGamma() {
		return this.gamma;
	}

	public void setGamma(BigDecimal gamma) {
		this.gamma = gamma;
	}

	@Column(name = "RHO", precision = 24, scale = 12)
	public BigDecimal getRho() {
		return this.rho;
	}

	public void setRho(BigDecimal rho) {
		this.rho = rho;
	}

	@Column(name = "VEGA", precision = 24, scale = 12)
	public BigDecimal getVega() {
		return this.vega;
	}

	public void setVega(BigDecimal vega) {
		this.vega = vega;
	}

	@Column(name = "LOGIN", length = 30)
	public String getLogin() {
		return this.login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	@Column(name = "OPIS", length = 500)
	public String getOpis() {
		return this.opis;
	}

	public void setOpis(String opis) {
		this.opis = opis;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "wycenaportfela")
	public Set<Wycenainstrumentu> getWycenainstrumentus() {
		return this.wycenainstrumentus;
	}

	public void setWycenainstrumentus(Set<Wycenainstrumentu> wycenainstrumentus) {
		this.wycenainstrumentus = wycenainstrumentus;
	}

}
